package com.zhanbo.zhanbowymusic.main.featured.adapter;

import android.content.Context;
import android.view.View;

import com.mwx.baselib.base.BaseBindingAdapter;
import com.mwx.baselib.bean.PlayListBean;
import com.mwx.baselib.bean.SceneListBean;
import com.mwx.baselib.utils.GlideUtils;
import com.zhanbo.zhanbowymusic.R;
import com.zhanbo.zhanbowymusic.databinding.ItemRecommendBinding;
import com.zhanbo.zhanbowymusic.databinding.ItemSceneBinding;

/**
 * 场景列表
 */
public class FeaturedSceneListAdapter extends BaseBindingAdapter<SceneListBean.ItemsDTO, ItemSceneBinding> {
    public FeaturedSceneListAdapter(Context context) {
        super(context);
    }

    @Override
    protected int getLayoutResId(int viewType) {
        return R.layout.item_scene;
    }

    @Override
    protected void onBindItem(ItemSceneBinding binding, SceneListBean.ItemsDTO item) {
        GlideUtils.loadImage(context,item.getImage(),binding.ivHead);
        binding.tvTitle.setText("");
        if (item.isCheck()){
            binding.icCheck.setVisibility(View.VISIBLE);
        }else {
            binding.icCheck.setVisibility(View.INVISIBLE);
        }
    }
}
